// Copyright (c) 2009 Luca Marrocco.
// Modified or written by Luca Marrocco for inclusion with codej.
// Licensed under the Apache License, Version 2.0 (the "License")
package codej.gen;

import java.util.*;

/** @author Luca Marrocco */
public class ListBuffer implements Buffer {

	private List<Object> listBuffer = new LinkedList<Object>();

	public Buffer append(Object object) {
		listBuffer.add(object);

		return this;
	}

	public String toString() {
		StringBuffer stringBuffer = new StringBuffer();

		for (Object object : listBuffer)
			stringBuffer.append(object);

		return stringBuffer.toString();
	}
}
